{extend name="$index_style_layout" /}
 
{block name="nav"}{/block}
{block name="body_content"}
<style type="text/css">
div, p, dl, dt, dd,td,span,li,a,h3,h4{font-family: Arial, Helvetica, sans-serif, Microsoft Yahei; margin:0; padding:0;}
.b{font-weight:bold;}
.red{color:#ff3333;}
.blue{color:blue;}
.RmbPayCont{background:#f3f3f3;}
.payAdd h3{height:65px; text-align:center; line-height:65px; color:#fff;  font-size:22px; background:#32a5f0;}
.payAdd h3 span{position:relative; width:100px; display:block; margin:0 auto; padding-left:60px;}
.payAdd h3 span:before{content:''; position:absolute; display:block; width:26px; height:31px; top:16px; left:32px; background:url('wpay.png') 0 -105px no-repeat;}
.RmbPayCont .m-payT{height:25px; font-size:14px; background:url('wpay.png') 0 -158px no-repeat; margin:20px 3% 20px 3%;}
.m-payT span{height:20px; line-height:20px;}
.m-payT span:first-child{float:left; padding-left:22px;}
.m-payT span:last-child{float:right; color:#868686;}
.RmbPayCont .ws-pay{background:#fff; padding:0 3%;}
.ws-pay .m-payAll{padding-top:25px; padding-bottom:25px; font-size:22px; border-bottom:1px dashed #e5e5e5; text-align:center;}
.ws-pay .m-payUse{margin:30px 0 30px 0; overflow:hidden;}
.ws-pay .m-payUse div:first-child{float:left; font-size:18px;}
.ws-pay .m-payUse div:last-child{font-size:12px; color:#999;}
.ws-pay .m-payPw{font-size:18px; padding-bottom:40px;}
.ws-pay .m-payPw input{max-width:400px; width:67%; height:50px; border:1px solid #e5e5e5; border-radius:5px; background:#fafafa; text-align:center; line-height:50px; font-size:16px;}
.RmbPayCont .m-payBt{text-align:center; padding-bottom:40px;}
.RmbPayCont .m-payBt input{max-width:400px; width:67%; height:66px; border:0; border-radius:5px; background:#ff3333; text-align:center; line-height:66px; color:#fff; font-size:18px;}
.RmbPayCont .m-payInfo{height:25px; line-height:25px; font-size:14px; padding-left:27px; background:url('wpay.png') 0px -224px no-repeat; margin:20px 3%;}
.RmbPayCont .m-otherPay{padding-bottom:20px; padding-top:10px;}
.RmbPayCont .m-otherPay span{position:relative; display:block; width:312px; height:45px; margin:0 auto;}
.RmbPayCont .m-otherPay span:before{content:''; width:36px; height:27px; position:absolute; left:1px; top: 7px; background:url('wpay.png') 0 -263px no-repeat;}
.RmbPayCont .m-otherPay a{width:245px; height:45px; margin-left:45px; letter-spacing:5px; font-size:18px; line-height:45px; display:block; color:#fff; background:#ff9933; border-radius:5px; text-align:center; font-family: microsoft yahei;}
/* wapolpay */
.wx h3{height:40px; line-height:40px; color:#fff;  font-size:18px; background:#32a5f0;}
.wx h3 span{position:relative; display:block; text-align:center;   /*margin:0 auto; width:100px; padding-left:60px; */}
/*.wx h3 span:before{content:''; position:absolute; display:block; width:32px; height:27px; left:14px; top:20px; background:#32a5f0 url('wpay.png') 0 -63px no-repeat;}*/
.wx .m-payStyle{margin:25px 0 10px 0; font-size:16px;}
.wx .payList{text-align:center;}
.wx .payList li{position:relative; width:200px; margin:20px auto 0 auto; padding-bottom:30px; height:56px;}
.wx .payList li em{position:absolute; top:0; left:0; z-index:999;}
.wx .payList input{width:200px; height:54px; opacity:0;}
.wx .payList li span{position:absolute; width:200px; height:54px; display:block; top:0; left:0; z-index:3; border:1px solid #ddd; background:url('wpay.png') 13px 4px no-repeat; line-height:54px;}
.wx .payList li.ck span{border:1px solid red;}
.wx .payList li.zfb span{background-position:7px -299px ;}
.wx .payList li.ck span:after{content:''; width:23px; height:19px; position:absolute; bottom:0; right:0; background:url('wpay.png') 1px -187px no-repeat;}
.wx .m-wxPay{margin-top:20px;padding-bottom:30px;}
.wx .m-wxPay a{display:block; max-width:288px; width:45%; height:60px; line-height:60px; background:#ff9900; font-size:18px; color:#fff; box-shadow:1px 1px 2px #f3f3f3; border-radius:5px; text-align:center; margin:0 auto;}
</style>
<div class="RmbPayCont wx">
  	<h3><span>请选择一种支付方式</span></h3>

	<!--<div class="m-payT" style="display:none;"><span>您正在使用安全支付</span><span>2018-08-03 04:09</span></div>-->
    <div class="ws-pay">
	  
	  <div class="m-payAll">本次共需支付：<span class="b red">{$money}</span> 元</div>
      <div class="m-payStyle" style="display:none;">请选择一种支付方式</div>
	  <ul class="payList">

          <li {if $money>0&&in_weixin()}class='ck'{/if}><em><input type='radio' name='paytype' value='weixin' {if $money>0&&in_weixin()}checked{/if} /></em><span style="color:green;" class="fa fa-wechat"> 微信支付</span></li>

{if !in_weixin()}
		  <li {if $money>0&&!in_weixin()}class='ck'{/if}><em><input type='radio' name='paytype' value='alipay' {if $money>0&&!in_weixin()}checked{/if} /></em><span style="color:#059CD8;" class="fa fa-buysellads">支付宝</span></li>
{/if}

{if $userdb.rmb>=$money}
		  <li {if $money==0}class='ck'{/if}><em><input type='radio' name='paytype' value='rmb' {if $money==0}checked{/if} {if $money>$userdb.rmb} onclick="layer.alert('你余额不足,不能使用余额支付!')" {/if}/></em><span style="color:#B94303;" class="glyphicon glyphicon-yen">余额(可用:{$userdb.rmb}元)</span></li>
{/if}
      </ul>
	</div>
    <div class="m-wxPay"><a href="javascript:paytype();">下一步</a></div>
</div>
<script language="JavaScript">

{if in_weixin()&&$money>$userdb['rmb']}
	paytype();
{/if}

function paytype(){
	var type='';
	$(".payList input").each(function(i){
		if($(this).attr('checked')){type = $(this).val();}
	});
	if(type==''){
		alert("请选择一种支付类型!");
		return ;
	}
	window.location.href="{$weburl}&banktype="+type;
}

$(".payList li").click(function(){
	$(this).addClass("ck").siblings().removeClass("ck");
	$(".payList li input").attr("checked",false);
	$(this).find("input").attr("checked",true);
});

</script>


{/block}